/*
 * Powered By dico
 * Since 2017 - 2018
 */package com.seeyoui.kensite.bussiness.orderlang.payLog.service;
 
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.seeyoui.kensite.common.base.service.BaseService;

import java.util.*;

import com.seeyoui.kensite.common.base.domain.EasyUIDataGrid;
import com.seeyoui.kensite.common.base.service.BaseService;
import com.seeyoui.kensite.common.exception.CRUDException;
import com.seeyoui.kensite.common.util.*;
import com.seeyoui.kensite.common.constants.StringConstant;
import com.seeyoui.kensite.bussiness.orderlang.payLog.domain.PayLog;
import com.seeyoui.kensite.bussiness.orderlang.payLog.persistence.PayLogMapper;

/**
 * PayLog
 * @author dico
 * @version 2.0
 * @since 1.0
 * @date 2018-02-08
 */

@Service
public class PayLogService extends BaseService {
	
	@Autowired
	private PayLogMapper payLogMapper;

	/**
	 * 根据ID查询单条数据
	 * @param id
	 * @return
	 * @throws CRUDException
	 */
	public PayLog findOne(String id) throws CRUDException{
		return payLogMapper.findOne(id);
	}
	
	/**
	 * 查询数据集合
	 * @param payLog
	 * @return
	 * @throws CRUDException
	 */
	public List<PayLog> findList(PayLog payLog) throws CRUDException {
		return payLogMapper.findList(payLog);
	}
	
	/**
	 * 查询所有数据集合
	 * @param payLog
	 * @return
	 * @throws CRUDException
	 */
	public List<PayLog> findAll(PayLog payLog) throws CRUDException {
		return payLogMapper.findAll(payLog);
	}
	
	/**
	 * 查询数据总数
	 * @param payLog
	 * @return
	 * @throws CRUDException
	 */
	public int findTotal(PayLog payLog) throws CRUDException {
		return payLogMapper.findTotal(payLog);
	}
	
	/**
	 * 查询数据总数排除当前数据
	 * @param payLog
	 * @return
	 * @throws CRUDException
	 */
	public int findExTotal(PayLog payLog) throws CRUDException {
		return payLogMapper.findExTotal(payLog);
	}
	
	/**
	 * 数据新增
	 * @param payLog
	 * @throws CRUDException
	 */
	public void save(PayLog payLog) throws CRUDException{
		payLog.preInsert();
		payLogMapper.save(payLog);
	}
	
	/**
	 * 数据修改
	 * @param payLog
	 * @throws CRUDException
	 */
	public void update(PayLog payLog) throws CRUDException{
		payLog.preUpdate();
		payLogMapper.update(payLog);			
	}
	
	/**
	 * 数据删除
	 * @param listId
	 * @throws CRUDException
	 */
	public void delete(List<String> listId) throws CRUDException {
		payLogMapper.delete(listId);
	}
	
	/**
	 * 数据假删除
	 * @param payLog
	 * @throws CRUDException
	 */
	public void remove(PayLog payLog) throws CRUDException{
		payLog.preUpdate();
		payLogMapper.remove(payLog);			
	}
	
}